package com.test.loop;

public class DeadLoopDemo7 {
    public static void main(String[] args) {
        //目标：掌握死循环的书写
        test1();
    }

    public static void test1() {
        //1.for死循环
//        for (;;) {
//            System.out.println("helloworld!");
//        }
        //2.while死循环
//        while (true) {
//            System.out.println("helloworld!");
//        }
        //3.do...while死循环
        do {
            System.out.println("helloworld!");
        } while (true);

    }
}
